/**
 * 2010(c) Copyright Oceansoft Information System Co.,LTD. All rights reserved.
 * <p>
 * Compile: JDK 1.6+
 * <p>
 * 版权所有(C)：江苏欧索软件有限公司
 * <p>
 * 公司名称：江苏欧索软件有限公司
 * <p>
 * 公司地址：中国苏州科技城青山路1号
 * <p>
 * 网址: http://www.oceansoft.com.cn
 * <p>
 * 作者: 090922(陈伟)
 * <p>
 * 文件名: com.oceansoft.mobile.biz.admin.entity.SysUser.java
 * <p>
 * 类产生时间: 14-2-13 下午5:30
 * <p>
 * 负责人: 090922(陈伟)
 * <p>
 * Email:javacspring@gmail.com
 * <p>
 * 所在组 : 掌上公安应用平台
 * <p>
 * 所在部门: 开发部--手持技术部
 * <p>
 * <p>
 */
package com.oceansoft.mobile.biz.admin.entity;

import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: chenw
 * @time: 14-2-13 下午5:30
 */
public class SysUser implements Serializable{

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long id;
    private long merchant_id;
    private long role_id;
    private String login_id;
    private String u_name;
    private String u_pwd;
    private String role_name;
    private int status;
    private long auth_id;
    
    private String company_name;

    public static RowMapper<SysUser> getLoginAuthRowMapper() {
        return new RowMapper<SysUser>() {
            public SysUser mapRow(ResultSet rs, int rowNum) throws SQLException {
                SysUser obj = new SysUser();
                obj.setId(rs.getLong("ID"));
                obj.setLogin_id(rs.getString("login_id"));
                obj.setRole_id(rs.getLong("role_id"));
                obj.setStatus(rs.getInt("status"));
                obj.setRole_name(rs.getString("role_name"));
                obj.setMerchant_id(rs.getLong("merchant_id"));
                obj.setU_name(rs.getString("u_name"));
                obj.setU_pwd(rs.getString("u_pwd"));
                obj.setAuth_id(rs.getLong("auth_id"));
                
                obj.setCompany_name(rs.getString("company_name"));
                return obj;
            }
        };
    }


	public long getAuth_id() {
		return auth_id;
	}


	public void setAuth_id(long auth_id) {
		this.auth_id = auth_id;
	}


	public String getCompany_name() {
		return company_name;
	}

	public void setCompany_name(String company_name) {
		this.company_name = company_name;
	}

	public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }
    
    
	public long getRole_id() {
		return role_id;
	}

	public void setRole_id(long role_id) {
		this.role_id = role_id;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}


	public String getLogin_id() {
		return login_id;
	}

	public void setLogin_id(String login_id) {
		this.login_id = login_id;
	}


	public String getU_name() {
		return u_name;
	}

	public void setU_name(String u_name) {
		this.u_name = u_name;
	}


	public String getU_pwd() {
		return u_pwd;
	}

	public void setU_pwd(String u_pwd) {
		this.u_pwd = u_pwd;
	}

	public String getRole_name() {
		return role_name;
	}

	public void setRole_name(String role_name) {
		this.role_name = role_name;
	}

	public long getMerchant_id() {
		return merchant_id;
	}

	public void setMerchant_id(long merchant_id) {
		this.merchant_id = merchant_id;
	}

}
